home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / xdme_1.84_src.lha / XDME / Src / amiga.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-04  |  2.8 KB  |  135 lines

  1. /******************************************************************************
  2.  
  3.     MODUL
  4.     $Id: amiga.c 1.3 1994/09/09 12:31:30 digulla Exp digulla $
  5.  
  6.     DESCRIPTION
  7.     Amiga specific things
  8.  
  9.     HISTORY
  10.     10. Oct 1992    ada created
  11.     $Log: amiga.c $
  12.  * Revision 1.3  1994/09/09  12:31:30  digulla
  13.  * added new style Prototypes, DEFCMD and DEFHELP
  14.  *
  15.  * Revision 1.2  1994/08/30  11:07:20  digulla
  16.  * added some parentheses for GCC
  17.  *
  18.  * Revision 1.1  1994/08/14  12:27:53  digulla
  19.  * Initial revision
  20.  *
  21.  
  22. ******************************************************************************/
  23.  
  24. /**************************************
  25.         Includes
  26. **************************************/
  27. #include <defs.h>
  28.  
  29.  
  30. /**************************************
  31.         Globale Variable
  32. **************************************/
  33.  
  34.  
  35. /**************************************
  36.       Interne Defines & Strukturen
  37. **************************************/
  38.  
  39.  
  40. /**************************************
  41.         Interne Variable
  42. **************************************/
  43.  
  44.  
  45. /**************************************
  46.        Interne Prototypes
  47. **************************************/
  48.  
  49.  
  50. /*****************************************************************************
  51.  
  52.     NAME
  53.     set_pubscreen
  54.  
  55.     PARAMETER
  56.     void
  57.  
  58.     RESULT
  59.  
  60.     RETURN
  61.     void
  62.  
  63.     DESCRIPTION
  64.     Sets the name for the pubscreen XDME should open its windows on.
  65.  
  66.     NOTES
  67.  
  68.     BUGS
  69.     This is only a dummy (Sorry).
  70.  
  71.     EXAMPLES
  72.  
  73.     SEE ALSO
  74.  
  75.     INTERNALS
  76.  
  77.     HISTORY
  78.     10. Oct 1992    ada created
  79.  
  80. ******************************************************************************/
  81.  
  82. /*DEFHELP #cmd prefs PUBSCREEN name - open next window on screen @{B}name@{UB}. Use an empty string to turn it off (ie. "pubscreen `'") */
  83.  
  84. DEFUSERCMD("pubscreen", 1, CF_VWM|CF_ICO,void, set_pubscreen, (void),)
  85. {
  86.     static char * name = NULL;
  87.  
  88.     /* If there is already a name, free it first */
  89.  
  90.     if (name)
  91.     {
  92.     free (name);
  93.     name = NULL;
  94.     }
  95.  
  96.     /* If there is a new name, get it */
  97.  
  98.     if (av[1][0])
  99.     {
  100.     /* Make a copy of the name */
  101.     if ((name = strdup (av[1])))
  102.     {
  103.         if (XDMEArgs.publicscreenname)
  104.         free (XDMEArgs.publicscreenname);
  105.  
  106.         XDMEArgs.publicscreenname = name;
  107.  
  108.         /* give user a hint what we did */
  109.  
  110.         if (name)
  111. DEFMESSAGE( __set_pubscreen_to, "Set PubScreen to `%s'" )
  112.         title (__set_pubscreen_to, name);
  113.     }
  114.     else
  115. DEFMESSAGE( __out_of_memory, "%s: Out of memory !" )
  116.         warn (__out_of_memory, av[0]);
  117.     } else
  118.     {
  119.     /* Disable PubScreens */
  120.  
  121.     if (XDMEArgs.publicscreenname)
  122.         free (XDMEArgs.publicscreenname);
  123.  
  124.     XDMEArgs.publicscreenname = NULL;
  125.  
  126. DEFMESSAGE( __turned_pubscreen_off, "turned PubScreen OFF" )
  127.     title (__turned_pubscreen_off);
  128.     }
  129. } /* set_pubscreen */
  130.  
  131.  
  132. /******************************************************************************
  133. *****  ENDE amiga.c
  134. ******************************************************************************/
  135.